<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- QCtmDrawerWidget.cpp -->
  <meta name="description" content="抽屉窗口类.">
  <title>QCtmDrawerWidget Class | QCustomUi 1.16.0</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li><a href="index.html" translate="no">QCustomUi 1.16.0</a></li>
<li><a href="qcustomui-module.html" translate="no">QCustomUi</a></li>
<li>QCtmDrawerWidget</li>
<li id="buildversion">QCustomUi 1.16.0 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3 id="toc">Contents</h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#reimplemented-protected-functions">Reimplemented Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title" translate="no">QCtmDrawerWidget Class</h1>
<!-- $$$QCtmDrawerWidget-brief -->
<p>抽屉窗口类. <a href="#details">More...</a></p>
<!-- @@@QCtmDrawerWidget -->
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">  <span class="preprocessor">#include &lt;QCtmDrawerWidget.h&gt;</span></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> QWidget</td></tr>
</table></div>
<ul>
<li><a href="qctmdrawerwidget-members.html">List of all members, including inherited members</a></li>
</ul>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn" translate="no"><b><a href="qctmdrawerwidget.html#exclusive-prop" translate="no">exclusive</a></b> : bool</li>
</ul>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qctmdrawerwidget.html#QCtmDrawerWidget" translate="no">QCtmDrawerWidget</a></b>(QWidget *<i>parent</i> = nullptr)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qctmdrawerwidget.html#dtor.QCtmDrawerWidget" translate="no">~QCtmDrawerWidget</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCtmDrawerItemWidget *</td><td class="memItemRight bottomAlign"><b><a href="qctmdrawerwidget.html#addWidget" translate="no">addWidget</a></b>(const QString &amp;<i>title</i>, QWidget *<i>widget</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qctmdrawerwidget.html#count" translate="no">count</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qctmdrawerwidget.html#exclusive" translate="no">exclusive</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QSize &amp;</td><td class="memItemRight bottomAlign"><b><a href="qctmdrawerwidget.html#iconSize" translate="no">iconSize</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qctmdrawerwidget.html#indexOf" translate="no">indexOf</a></b>(QCtmDrawerItemWidget *<i>item</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCtmDrawerItemWidget *</td><td class="memItemRight bottomAlign"><b><a href="qctmdrawerwidget.html#insertWidget" translate="no">insertWidget</a></b>(int <i>index</i>, const QString &amp;<i>title</i>, QWidget *<i>widget</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCtmDrawerItemWidget *</td><td class="memItemRight bottomAlign"><b><a href="qctmdrawerwidget.html#item" translate="no">item</a></b>(int <i>index</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdrawerwidget.html#removeItem" translate="no">removeItem</a></b>(QCtmDrawerItemWidget *<i>item</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdrawerwidget.html#setExclusive" translate="no">setExclusive</a></b>(bool <i>exclusive</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdrawerwidget.html#setIconSize" translate="no">setIconSize</a></b>(const QSize &amp;<i>size</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdrawerwidget.html#setSizes" translate="no">setSizes</a></b>(const QList&lt;int&gt; &amp;<i>sizes</i>)</td></tr>
</table></div>
<h2 id="public-slots">Public Slots</h2>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdrawerwidget.html#collapseAll" translate="no">collapseAll</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdrawerwidget.html#expandAll" translate="no">expandAll</a></b>()</td></tr>
</table></div>
<h2 id="signals">Signals</h2>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdrawerwidget.html#iconSizeChanged" translate="no">iconSizeChanged</a></b>(const QSize &amp;<i>size</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdrawerwidget.html#itemExpandChanged" translate="no">itemExpandChanged</a></b>(QCtmDrawerItemWidget *<i>item</i>, bool <i>expand</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmdrawerwidget.html#itemTitleClicked" translate="no">itemTitleClicked</a></b>(QCtmDrawerItemWidget *<i>item</i>, bool <i>expand</i>)</td></tr>
</table></div>
<h2 id="protected-functions">Protected Functions</h2>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qctmdrawerwidget.html#isAllCollapsed" translate="no">isAllCollapsed</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qctmdrawerwidget.html#totalSize" translate="no">totalSize</a></b>(const QList&lt;int&gt; &amp;<i>sizes</i>) const</td></tr>
</table></div>
<h2 id="reimplemented-protected-functions">Reimplemented Protected Functions</h2>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qctmdrawerwidget.html#showEvent" translate="no">showEvent</a></b>(QShowEvent *<i>event</i>) override</td></tr>
</table></div>
<!-- $$$QCtmDrawerWidget-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p><b>抽屉窗口的截图:</b></p>
<p class="centerAlign"><img src="images/QCtmDrawerWidgetDetail.png" alt="" /></p></div>
<!-- @@@QCtmDrawerWidget -->
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$exclusive-prop$$$exclusive$$$setExclusivebool -->
<h3 class="fn" translate="no" id="exclusive-prop"><span class="name">exclusive</span> : <span class="type">bool</span></h3>
<p>该属性表示抽屉窗口的各项展开状态是否互斥.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qctmdrawerwidget.html#exclusive" translate="no">exclusive</a></b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qctmdrawerwidget.html#setExclusive" translate="no">setExclusive</a></b></span>(bool <i>exclusive</i>)</td></tr>
</table></div>
<!-- @@@exclusive -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QCtmDrawerWidget[overload1]$$$QCtmDrawerWidgetQWidget* -->
<h3 class="fn" translate="no" id="QCtmDrawerWidget"><code class="details extra" translate="no">[explicit]</code> QCtmDrawerWidget::<span class="name">QCtmDrawerWidget</span>(<span class="type">QWidget</span> *<i>parent</i> = nullptr)</h3>
<p>构造一个父窗口为 <i translate="no">parent</i> 的抽屉窗口对象.</p>
<!-- @@@QCtmDrawerWidget -->
<!-- $$$~QCtmDrawerWidget[overload1]$$$~QCtmDrawerWidget -->
<h3 class="fn" translate="no" id="dtor.QCtmDrawerWidget"><code class="details extra" translate="no">[virtual noexcept]</code> QCtmDrawerWidget::<span class="name">~QCtmDrawerWidget</span>()</h3>
<p>销毁该抽屉窗口对象.</p>
<!-- @@@~QCtmDrawerWidget -->
<!-- $$$addWidget[overload1]$$$addWidgetconstQString&QWidget* -->
<h3 class="fn" translate="no" id="addWidget"><span class="type"><a href="qctmdraweritemwidget.html" translate="no">QCtmDrawerItemWidget</a></span> *QCtmDrawerWidget::<span class="name">addWidget</span>(const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>title</i>, <span class="type">QWidget</span> *<i>widget</i>)</h3>
<p>添加并返回一个标题为 <i translate="no">title</i> 容纳窗口为 <i translate="no">widget</i> 的抽屉项.</p>
<p><b>See also </b><a href="qctmdrawerwidget.html#insertWidget" translate="no">insertWidget</a> and <a href="qctmdrawerwidget.html#removeItem" translate="no">removeItem</a>.</p>
<!-- @@@addWidget -->
<!-- $$$collapseAll[overload1]$$$collapseAll -->
<h3 class="fn" translate="no" id="collapseAll"><code class="details extra" translate="no">[slot]</code> <span class="type">void</span> QCtmDrawerWidget::<span class="name">collapseAll</span>()</h3>
<p>关闭所有抽屉项.</p>
<p><b>See also </b><a href="qctmdrawerwidget.html#expandAll" translate="no">expandAll</a>().</p>
<!-- @@@collapseAll -->
<!-- $$$count[overload1]$$$count -->
<h3 class="fn" translate="no" id="count"><span class="type">int</span> QCtmDrawerWidget::<span class="name">count</span>() const</h3>
<p>返回抽屉项数量.</p>
<!-- @@@count -->
<!-- $$$exclusive -->
<h3 class="fn" translate="no" id="exclusive"><span class="type">bool</span> QCtmDrawerWidget::<span class="name">exclusive</span>() const</h3>
<p>返回抽屉项的展开状态是否互斥.</p>
<div class="admonition note"><p><b>Note: </b>Getter function for property exclusive. </p>
</div><p><b>See also </b><a href="qctmdrawerwidget.html#setExclusive" translate="no">setExclusive</a>.</p>
<!-- @@@exclusive -->
<!-- $$$expandAll[overload1]$$$expandAll -->
<h3 class="fn" translate="no" id="expandAll"><code class="details extra" translate="no">[slot]</code> <span class="type">void</span> QCtmDrawerWidget::<span class="name">expandAll</span>()</h3>
<p>展开所有抽屉项.</p>
<p><b>See also </b><a href="qctmdrawerwidget.html#collapseAll" translate="no">collapseAll</a>().</p>
<!-- @@@expandAll -->
<!-- $$$iconSize -->
<h3 class="fn" translate="no" id="iconSize">const <span class="type"><a href="https://doc.qt.io/qt/qsize.html" translate="no">QSize</a></span> &amp;QCtmDrawerWidget::<span class="name">iconSize</span>() const</h3>
<p>返回Action的图标大小.</p>
<div class="admonition note"><p><b>Note: </b>Getter function for property iconSize. </p>
</div><p><b>See also </b><a href="qctmdrawerwidget.html#setIconSize" translate="no">setIconSize</a>.</p>
<!-- @@@iconSize -->
<!-- $$$iconSizeChanged -->
<h3 class="fn" translate="no" id="iconSizeChanged"><code class="details extra" translate="no">[signal]</code> <span class="type">void</span> QCtmDrawerWidget::<span class="name">iconSizeChanged</span>(const <span class="type"><a href="https://doc.qt.io/qt/qsize.html" translate="no">QSize</a></span> &amp;<i>size</i>)</h3>
<p>当Action的图标大小发生改变时发送该信号 <i translate="no">size</i>.</p>
<div class="admonition note"><p><b>Note: </b>Notifier signal for property <a href="qctmdrawerwidget.html#iconSize" translate="no">iconSize</a>. </p>
</div><p><b>See also </b><a href="qctmdrawerwidget.html#setIconSize" translate="no">setIconSize</a>.</p>
<!-- @@@iconSizeChanged -->
<!-- $$$indexOf[overload1]$$$indexOfQCtmDrawerItemWidget* -->
<h3 class="fn" translate="no" id="indexOf"><span class="type">int</span> QCtmDrawerWidget::<span class="name">indexOf</span>(<span class="type"><a href="qctmdraweritemwidget.html" translate="no">QCtmDrawerItemWidget</a></span> *<i>item</i>) const</h3>
<p>返回抽屉项 <i translate="no">item</i> 所在的位置.</p>
<p><b>See also </b><a href="qctmdrawerwidget.html#item" translate="no">item</a>.</p>
<!-- @@@indexOf -->
<!-- $$$insertWidget[overload1]$$$insertWidgetintconstQString&QWidget* -->
<h3 class="fn" translate="no" id="insertWidget"><span class="type"><a href="qctmdraweritemwidget.html" translate="no">QCtmDrawerItemWidget</a></span> *QCtmDrawerWidget::<span class="name">insertWidget</span>(<span class="type">int</span> <i>index</i>, const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>title</i>, <span class="type">QWidget</span> *<i>widget</i>)</h3>
<p>在 <i translate="no">index</i> 位置插入并返回一个标题为 <i translate="no">title</i> 容纳窗口为 <i translate="no">widget</i> 的抽屉项.</p>
<p><b>See also </b><a href="qctmdrawerwidget.html#addWidget" translate="no">addWidget</a> and <a href="qctmdrawerwidget.html#removeItem" translate="no">removeItem</a>.</p>
<!-- @@@insertWidget -->
<!-- $$$isAllCollapsed[overload1]$$$isAllCollapsed -->
<h3 class="fn" translate="no" id="isAllCollapsed"><code class="details extra" translate="no">[protected]</code> <span class="type">bool</span> QCtmDrawerWidget::<span class="name">isAllCollapsed</span>() const</h3>
<p>返回所有的抽屉项是否都关闭了.</p>
<!-- @@@isAllCollapsed -->
<!-- $$$item[overload1]$$$itemint -->
<h3 class="fn" translate="no" id="item"><span class="type"><a href="qctmdraweritemwidget.html" translate="no">QCtmDrawerItemWidget</a></span> *QCtmDrawerWidget::<span class="name">item</span>(<span class="type">int</span> <i>index</i>) const</h3>
<p>返回 <i translate="no">index</i> 位置的抽屉项.</p>
<p><b>See also </b><a href="qctmdrawerwidget.html#indexOf" translate="no">indexOf</a>.</p>
<!-- @@@item -->
<!-- $$$itemExpandChanged[overload1]$$$itemExpandChangedQCtmDrawerItemWidget*bool -->
<h3 class="fn" translate="no" id="itemExpandChanged"><code class="details extra" translate="no">[signal]</code> <span class="type">void</span> QCtmDrawerWidget::<span class="name">itemExpandChanged</span>(<span class="type"><a href="qctmdraweritemwidget.html" translate="no">QCtmDrawerItemWidget</a></span> *<i>item</i>, <span class="type">bool</span> <i>expand</i>)</h3>
<p>抽屉项 <i translate="no">item</i> 的展开状态 <i translate="no">expand</i> 发生变化时发送该信号.</p>
<p><b>See also </b><a href="qctmdrawerwidget.html#itemTitleClicked" translate="no">itemTitleClicked</a>.</p>
<!-- @@@itemExpandChanged -->
<!-- $$$itemTitleClicked[overload1]$$$itemTitleClickedQCtmDrawerItemWidget*bool -->
<h3 class="fn" translate="no" id="itemTitleClicked"><code class="details extra" translate="no">[signal]</code> <span class="type">void</span> QCtmDrawerWidget::<span class="name">itemTitleClicked</span>(<span class="type"><a href="qctmdraweritemwidget.html" translate="no">QCtmDrawerItemWidget</a></span> *<i>item</i>, <span class="type">bool</span> <i>expand</i>)</h3>
<p>抽屉项 <i translate="no">item</i> 的标题被点击时发送该信号 <i translate="no">expand</i>.</p>
<p><b>See also </b><a href="qctmdrawerwidget.html#itemExpandChanged" translate="no">itemExpandChanged</a>.</p>
<!-- @@@itemTitleClicked -->
<!-- $$$removeItem[overload1]$$$removeItemQCtmDrawerItemWidget* -->
<h3 class="fn" translate="no" id="removeItem"><span class="type">void</span> QCtmDrawerWidget::<span class="name">removeItem</span>(<span class="type"><a href="qctmdraweritemwidget.html" translate="no">QCtmDrawerItemWidget</a></span> *<i>item</i>)</h3>
<p>移除给予的抽屉项 <i translate="no">item</i>.</p>
<p><b>See also </b><a href="qctmdrawerwidget.html#addWidget" translate="no">addWidget</a> and <a href="qctmdrawerwidget.html#insertWidget" translate="no">insertWidget</a>.</p>
<!-- @@@removeItem -->
<!-- $$$setExclusive -->
<h3 class="fn" translate="no" id="setExclusive"><span class="type">void</span> QCtmDrawerWidget::<span class="name">setExclusive</span>(<span class="type">bool</span> <i>exclusive</i>)</h3>
<p>设置抽屉项的展开状态是否互斥 <i translate="no">exclusive</i>.</p>
<div class="admonition note"><p><b>Note: </b>Setter function for property <a href="qctmdrawerwidget.html#exclusive" translate="no">exclusive</a>. </p>
</div><p><b>See also </b><a href="qctmdrawerwidget.html#exclusive" translate="no">exclusive</a>().</p>
<!-- @@@setExclusive -->
<!-- $$$setIconSize -->
<h3 class="fn" translate="no" id="setIconSize"><span class="type">void</span> QCtmDrawerWidget::<span class="name">setIconSize</span>(const <span class="type"><a href="https://doc.qt.io/qt/qsize.html" translate="no">QSize</a></span> &amp;<i>size</i>)</h3>
<p>设置Action的图标大小 <i translate="no">size</i>.</p>
<div class="admonition note"><p><b>Note: </b>Setter function for property <a href="qctmdrawerwidget.html#iconSize" translate="no">iconSize</a>. </p>
</div><p><b>See also </b><a href="qctmdrawerwidget.html#iconSize" translate="no">iconSize</a>.</p>
<!-- @@@setIconSize -->
<!-- $$$setSizes[overload1]$$$setSizesconstQList<int>& -->
<h3 class="fn" translate="no" id="setSizes"><span class="type">void</span> QCtmDrawerWidget::<span class="name">setSizes</span>(const <span class="type"><a href="https://doc.qt.io/qt/qlist.html" translate="no">QList</a></span>&lt;<span class="type">int</span>&gt; &amp;<i>sizes</i>)</h3>
<p>设置各抽屉项的大小 <i translate="no">sizes</i>.</p>
<!-- @@@setSizes -->
<!-- $$$showEvent[overload1]$$$showEventQShowEvent* -->
<h3 class="fn" translate="no" id="showEvent"><code class="details extra" translate="no">[override virtual protected]</code> <span class="type">void</span> QCtmDrawerWidget::<span class="name">showEvent</span>(<span class="type"><a href="https://doc.qt.io/qt/qshowevent.html" translate="no">QShowEvent</a></span> *<i>event</i>)</h3>
<!-- @@@showEvent -->
<!-- $$$totalSize[overload1]$$$totalSizeconstQList<int>& -->
<h3 class="fn" translate="no" id="totalSize"><code class="details extra" translate="no">[protected]</code> <span class="type">int</span> QCtmDrawerWidget::<span class="name">totalSize</span>(const <span class="type"><a href="https://doc.qt.io/qt/qlist.html" translate="no">QList</a></span>&lt;<span class="type">int</span>&gt; &amp;<i>sizes</i>) const</h3>
<p>返回 <i translate="no">sizes</i> 的总和.</p>
<!-- @@@totalSize -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> QCustomUi
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/> </div>
</body>
</html>
